{config_load file=global.conf}
{config_load file="_Tracks.conf" section="`$lang`"}
{*=====================================================================================*}
<table border="0" cellpadding="2" cellspacing="0">

    <tr>
        <td valign="top" style="display:none">

<table width="120" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">

   <tr>
    <td  width="65">
        <b>{#_Tracks__labelPeriod#}{*Period*}</b>
    </td>
    {foreach key="TradeID" name="pairs" item="itemPair" from=$pairsArr}
        <td align="right" wifth="50px">
            <b>{$itemPair.Pair}</b>
        </td>
    {/foreach}
   </tr>
{*=====================================================================================*}
{assign var="first" value="1"}
{assign var="last_year" value=""}
{foreach key="DateKey" name="dates" item="itemDate" from=$datesArr}

        {if $itemDate.Year<>$last_year}
            {if 0==$first} <tr><td colspan="2" style="font-size:6px; font-family:Verdana, Arial, Helvetica, sans-serif; ">&nbsp;</td></tr>{/if}
            {assign var="last_year" value="`$itemDate.Year`"}
        {/if}

  <tr id="trackrecord__row_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}">

    <td	{if $smarty.foreach.dates.iteration%2==1} class="darkRow" {/if}>
        {* normal value *}
        <div style="padding:2px 3px 3px 2px;" id="trackcell_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_date_normal">
            {$itemDate.Date}
        </div>
        {* / normal value *}
        {* selected value *}
        <div  style="color:#ffffff;background-color:#477ab1;padding:2px 3px 3px 2px;display:none" id="trackcell_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_date_selected">
            {$itemDate.Date}
        </div>
        {* /selected value *}
    </td>

    {foreach key="TradeID" name="pairs" item="itemPair" from=$pairsArr}
        <td {if $smarty.foreach.dates.iteration%2==1} class="darkRow" {/if} align="right">
            {* normal value *}
            <div style="padding:2px 3px 3px 2px;" id="trackcell_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_normal">
                <a style="text-decoration:underline;Cursor: pointer;"
                            onClick="javascripts:xajax_showTrackForecast({$TradeID},'{$itemDate.Start}','{$itemDate.Finish}', '{$itemDate.Active}', '{$SystemID}');">
                    <span id="trackcellvalue_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_normal">{$data.$DateKey.$TradeID}</span>
                </a>
            </div>
            {* / normal value *}
            {* selected value *}
            <div style="color:#ffffff;background-color:#477ab1;padding:2px 3px 3px 2px;display:none" id="trackcell_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_selected">
                <span id="trackcellvalue_{$TradeID}_{$itemDate.Start}_{$itemDate.Finish}_selected">{$data.$DateKey.$TradeID}</span>
            </div>
            {* /selected value *}
        </td>
        {assign var="first" value="0"}
    {/foreach}

  </tr>

{/foreach}
{*=====================================================================================*}
   <tr>
      <td><b>Total:</b></td>
  {foreach key="TradeID" name="pairs" item="itemPair" from=$pairsArr}
      <td align="right"  {*id="trackcellvalue_{$TradeID}_total"*}>
          <b>
            <span id="trackcellvalue_{$TradeID}_total">
               {$totalsArr.$TradeID.pips}
            </span>
          </b>
      </td>
  {/foreach}
   </tr>

</table>



</td>
<td width="30" valign="top" align="right" style="display:none">
    &nbsp;
    <div id="loadingTrackMessage">
        <img src="{#images_dir#}/loading.gif">
    </div>
    &nbsp;
</td>
</td>
<td  valign="top">

<div id="divTrackForecasts"></div>
</td>
</tr>
    </table>
{literal}
<script type="text/javascript">
<!--

    function showLoadingMessage() {
        xajax.$('loadingMessage').style.display='none';
        xajax.$('loadingTrackMessage').style.display='block';
    }//showLoadingMessage

    function hideLoadingMessage() {
        xajax.$('loadingMessage').style.display='none';
        xajax.$('loadingTrackMessage').style.display='none';
    }//hideLoadingMessage


    xajax.loadingFunction = showLoadingMessage;
    xajax.doneLoadingFunction = hideLoadingMessage;
    // -->
</script>
{/literal}
